<template>
  <div class="section-box" :style="{ height: height }">
    <div class="section-header">
      <div class="section-title">{{ title }}</div>
      <div class="section-tools">
        <slot name="tools" />
      </div>
    </div>
    <div class="section-body">
      <slot />
    </div>
  </div>
</template>
<script>
export default {
  components: {},
  props: {
    title: {
      type: String,
      default: "",
    },
    height: {
      type: [String, Number],
      default: "auto",
    },
  },
  data() {
    return {
      paperId: null,
    };
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.section-box {
  position: relative;
  border-radius: 8px;
  width: 100%;
  display: flex;
  flex-direction: column;
  .section-header {
    flex-shrink: 0;
    width: 100%;
    height: 46px;
    background-color: #ebedf2;
    padding: 0 24px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px 8px 0 0;

    .section-title {
      display: flex;
      align-items: center;
      font-size: 16px;
      color: #282f47;
      font-weight: bold;

      &::before {
        content: "";
        width: 2px;
        height: 15px;
        display: block;
        background-color: #1890ff;
        margin-right: 5px;
      }
    }

    .section-tools {
      display: flex;
      align-items: center;

      ::v-deep {
        .el-link + .el-link {
          margin-left: 30px;
        }
      }
    }
  }
  .section-body {
    width: 100%;
    flex: 1;
    background-color: #fff;
    overflow-y: auto;
    padding: 40px;
  }
}
</style>
